<template>
	<view>
		  <cmd-nav-bar :fixed="false"   background-color="linear-gradient(to right, rgb(243, 231, 219), rgb(247, 238,230))" title="追剧"  font-color="#000" ></cmd-nav-bar>
		
		
		<view class="mt-2">
			<text class="look ml-1 ">最近观看</text>
		</view>
		<view >
			<view class="hot-con d-flex flex-wrap">
				
				<view v-for="(item,index) in viewRecordList" :key="index" class="text-center span24-8 mt-2">
					<view class="cover dashed-con">
						<image class="coverimg" :src="item.coverImg"></image>
					</view>
					<view><text>{{item.title}}</text></view>
				</view>
				 
			<!-- 	<view class="first text-center span24-8 ">
					<view class="cover dashed-con">
						<image class="coverimg" src="/static/dpcq.png"></image>
					</view>
					<view><text>2132132</text></view>
				</view>
				
				 <view class="first text-center span24-8">
				 	<view class="cover dashed-con">
				 		<image class="coverimg" src="/static/dpcq.png"></image>
				 	</view>
				 	<view><text>2132132</text></view>
				 </view> -->
			</view>
			
			<view class="line mt-2"></view>
			 
			
		</view>
		
		
		
		<view class="mt-2">
			<text class="look ml-1 ">我的追剧</text>
		</view>
		<view class="mt-2">
			<view class="hot-con d-flex flex-wrap">
				<view class="text-center span24-8">
					<view class="cover dashed-con">
						<image class="coverimg" src="/static/dpcq.png"></image>
					</view>
					<view><text>2132132</text></view>
				</view>
				 
				<view class="first text-center span24-8 ">
					<view class="cover dashed-con">
						<image class="coverimg" src="/static/dpcq.png"></image>
					</view>
					<view><text>2132132</text></view>
				</view>
				
				 <view class="first text-center span24-8">
				 	<view class="cover dashed-con">
				 		<image class="coverimg" src="/static/dpcq.png"></image>
				 	</view>
				 	<view><text>2132132</text></view>
				 </view>
			</view>
			 
			
		</view>
		
		
	</view>
</template>

<script> 
 import { getUserViewRecord } from "@/common/api/theater.js"
    export default {
      components: {
		 
		},
        data() {
            return {
				viewRecordList:{} 
            }
        },
		onPullDownRefresh() {
		      console.log('onPullDownRefresh');
		      setTimeout(function () {
		          uni.stopPullDownRefresh();
		      }, 1000); 
		  }, 		// 上拉加载
		 onReachBottom: function() {
			 console.log('上拉加载');	
		},
		onLoad() {
			
		},
		onShow() {
		this.init()
		},
        methods: { 
		init() {
		 getUserViewRecord({userId:uni.getStorageSync("userInfo").id,page: 1,pageSize: 5}).then(res => {
			 if(res.code == 200){
				this.viewRecordList = res.result
			 }
		 })
		/* getTvCategory({ 
		 }).then(res => {
		 		this.categoryData = res.result.records
		 }) */
		 },  
        }
    }
</script>

<style>
	.look{font-family: 'PingFangSC-Medium';font-weight: bold;}
 
	.dashed-con{border:1px dashed #C3C2C2;}
	.hot-con text{font-size: 24rpx;font-family: PingFang SC;color: #000;}
	.cover{width:230rpx;height: 318rpx;}
	.coverimg{width:100%;height: 100%;}
	 .span24-8 {width: 29.78%; margin-left: 16rpx;}
	 .line{border:1px dashed #C3C2C2;height: 1px;}
</style>